home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / COMMUNIC / H191.ZIP / CA29-3.EXE / UNISON.CMD < prev    next >
OS/2 REXX Batch file  |  1993-04-27  |  2KB  |  61 lines

  1. LEGEND " UNISON.CMD"        ; Put script name on status bar...
  2. ;
  3. ; ----- Dial UNISON through TELENET and logon
  4. ;    R.McG; 10/92, Chicago
  5. ; ----------------------------------------------------------------
  6. ;    Note: You must create a logon file with MKLOGON in order to
  7. ;    have this script automatically log you on... Please see the
  8. ;    file SCRIPTS.DOC
  9. ; ----------------------------------------------------------------
  10. ;    Note: This script is written to be FCALLed, executed directly (F2)
  11. ;    or attached to a dialing directory entry (for manual execution).
  12. ; ----------------------------------------------------------------
  13. ;    Note: This script requires the script SPRINT.CMD.  SPRINT.CMD
  14. ;    requires that a dialing directory entry number be prepared.
  15. ;    Unless you modify SPRINT.CMD, the entry number defaults to 10.
  16. ; ----------------------------------------------------------------
  17. ;    S0 is modified by this script.
  18. ;    SUCCESS/FAILED is returned by this script to an FCALLer
  19. ;    FAILED -> 1) SPRINT.CMD failed to connect -or-
  20. ;          2) UNILOGON.CMD/ENF not found
  21. ; ----------------------------------------------------------------
  22. ;
  23. ;    Call SprintNet (if not already dialed)
  24. ;
  25.     IF NOT ISSC "SPRINT"    ; If script not available
  26.        MESS "SPRINT.CMD script not found"
  27.        EXIT            ; terminate script
  28.        ENDIF
  29.     FCALL "SPRINT"        ; Invoke SprintNet (telenet) subroutine
  30.     IF FAILED GOTO Exit    ; Exit if failed
  31.     SET TTHRU OFF        ; Let psw be typed
  32.     LEGEND "Connecting to UNISON"
  33. ;
  34. ;    Connect to UNISON
  35. ;
  36.     TRANSMIT "C UNISON!"    ; Send request to telenet for SOURCE
  37.     WAITFOR "Username:"    ; Wait for logon prompt
  38. ;
  39. ;    Set a few parms
  40. ;
  41.     SET BSUPPRESS OFF    ; Turn off blank line suppression
  42.     SET MASK ON        ; Turn on high bit mask
  43.     SET CDISPLAY ON        ; Display ctl chars
  44.     SET BACKSP OUT DELETE    ; Nondestructive BS
  45. ;
  46. ;    If we have a UNILOGON file, use it
  47. ;
  48.     IF ISSCFILE "UNILOGON"    ; If script file is available
  49.        FCALL "UNILOGON"    ; .. call it
  50.        SET SUCCESS ON    ; Set for caller (if called)
  51.     ELSE
  52.        SET SUCCESS OFF    ; Set for caller
  53.        ENDIF
  54.     SET TTHRU ON        ; Allow typethrough again
  55. ;
  56. ;    If invoked via FCALL, return.  Else signal completion
  57. ;
  58. Exit:
  59.     IF FCALLED FRETURN    ; W/ SUCCESS set according to logon logoff
  60.     ALARM            ; Sound alarm
  61.